#include<iostream>
#include<array>
#include<iomanip>
#include<cmath>

using namespace std;

array<double, 7> p1 = { 95.6, 96.9, 97.3, 94.7, 97.5, 99.0, 96.7};
array<double, 7> p2 = { 23.9,23.7,24.0,22.7,23.3,23.9,23.4 };
const double p0 = 1.019;
array<double, 7> r = { 0 };

int main()
{
	cout << setiosflags(ios::fixed) << setprecision(4);
	for (int i = 0; i < 7; ++i)
	{
		p1[i] = p0 + p1[i] / 2000;
		p2[i] = p0 + p2[i] / 2000;
	}
	cout << setprecision(3);
	for (int i = 0; i < 7; ++i)
	{
		r[i] = log10(p1[i] / p0) / log10(p1[i] / p2[i]);
	}
	double sumr = 0;
	sumr += r[1] + r[3] + r[4] + r[5] + r[6];
	double average = sumr / 5;
	cout << average << endl;
	double sub_all = 0;
	sub_all += exp2(r[1] - average) + exp2(r[3] - average) + exp2(r[4] - average) + exp2(r[5] - average) + exp2(r[6] - average);
	cout << sqrt(sub_all / 20) << endl;
	return 0;
}